using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Data.Linq;
using System.ComponentModel;

namespace MRSite.Entity
{
    //服务网点申请订单
    [Table(Name = "service_orders")]
    public class ServiceOrders : Entity
    {
        /// <summary>
        ///自增ID
        /// </summary>
        [Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
        public override int id { get; set; }

        /// <summary>
        ///订单号 S开头
        /// </summary>
        [Column(Name = "order_no")]
        public String order_no { get; set; }

        /// <summary>
        ///交易号担保支付用到
        /// </summary>
        [Column(Name = "trade_no")]
        public String trade_no { get; set; }

        /// <summary>
        ///用户ID
        /// </summary>
        [Column(Name = "user_id")]
        public int user_id { get; set; }

        /// <summary>
        ///用户名
        /// </summary>
        [Column(Name = "user_name")]
        public String user_name { get; set; }

        /// <summary>
        ///支付方式 1:支付宝支付;4：微信支付；5：余额支付；6：积分支付；7：余额+积分支付；8:配额支付;
        /// </summary>
        [Column(Name = "payment_id")]
        public int payment_id { get; set; }

        /// <summary>
        ///支付手续费
        /// </summary>
        [Column(Name = "payment_fee")]
        public Decimal payment_fee { get; set; }

        /// <summary>
        ///支付状态1未支付2已支付
        /// </summary>
        [Column(Name = "payment_status")]
        public int payment_status { get; set; }

        /// <summary>
        ///支付时间
        /// </summary>
        [Column(Name = "payment_time")]
        public DateTime? payment_time { get; set; }

        
         /// <summary>
        ///支付方式
        /// </summary>
        [Column(Name = "paymethod")]
        public String paymethod { get; set; }


        /// <summary>
        ///手机
        /// </summary>
        [Column(Name = "mobile")]
        public String mobile { get; set; }


        /// <summary>
        ///订单留言(买家)
        /// </summary>
        [Column(Name = "message")]
        public String message { get; set; }

        /// <summary>
        ///订单备注
        /// </summary>
        [Column(Name = "remark")]
        public String remark { get; set; }


        /// <summary>
        ///应付总金额
        /// </summary>
        [Column(Name = "payable_amount")]
        public Decimal payable_amount { get; set; }

        /// <summary>
        ///实付总金额
        /// </summary>
        [Column(Name = "real_amount")]
        public Decimal real_amount { get; set; }

        /// <summary>
        ///订单总金额
        /// </summary>
        [Column(Name = "order_amount")]
        public Decimal order_amount { get; set; }


        /// <summary>
        ///订单状态1生成订单,2已支付订单
        /// </summary>
        [Column(Name = "status")]
        public int status { get; set; }

        /// <summary>
        ///下单时间
        /// </summary>
        [Column(Name = "add_time")]
        public DateTime add_time { get; set; }



        /// <summary>
        ///订单类别(0:服务网点订单； )
        /// </summary>
        [Column(Name = "ordertype")]
        public int ordertype { get; set; }



        /// <summary>
        /// 关联的服务网点id
        /// </summary>
        [Column(Name = "service_id")]
        public int service_id { get; set; }

        /// <summary>
        /// 产品ID
        /// </summary>
        [Column(Name = "product_id")]
        public int product_id { get; set; }

        /// <summary>
        /// 价格
        /// </summary>
        [Column(Name = "price")]
        public Decimal price { get; set; }


        /// <summary>
        /// 数量
        /// </summary>
        [Column(Name = "quantity")]
        public int quantity { get; set; }

        /// <summary>
        /// 产品标题
        /// </summary>
        [Column(Name = "title")]
        public string title { get; set; }

        /// <summary>
        /// 年数
        /// </summary>
        [Column(Name = "year")]
        public int year { get; set; }


        /// <summary>
        ///应赠送贡献值
        /// </summary>
        [Column(Name = "score"), DefaultValue(0)]
        public decimal score { get; set; }




    }
}

